package com.dataextend.service.impl;

import com.dataextend.mapper.cluster.PermissionDao;
import com.dataextend.entity.PermissionEntity;
import com.dataextend.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private PermissionDao permissionDao;

    @Override
    public int add(PermissionEntity permissionEntity) {
        return permissionDao.add(permissionEntity);
    }

    @Override
    public int update(PermissionEntity permissionEntity) {
        return permissionDao.update(permissionEntity);
    }

    @Override
    public void delete(Long id) {
        permissionDao.delete(id);
    }

    @Override
    public PermissionEntity queryById(Long id) {
        return permissionDao.queryById(id);
    }

    @Override
    public List<PermissionEntity> list(PermissionEntity permissionEntity) {
        return permissionDao.list(permissionEntity);
    }
}
